//
//  CGSize+Inset.swift
//  PDFSign
//
//  Created by 李永彬 on 2025/9/27.
//

import UIKit

extension CGSize {
    func insetBy(dx: CGFloat, dy: CGFloat) -> CGSize {
        return CGSize(width: self.width - dx * 2, height: self.height - dy * 2)
    }
    
    func insetBy(insets: UIEdgeInsets) -> CGSize {
        return CGSize(
            width: self.width - insets.left - insets.right,
            height: self.height - insets.top - insets.bottom
        )
    }
}
